var login = new Vue({
    el:'#login',
    data:{
        emil:'',
        password:''
    },
    methods:{
        login:function(){
            $.ajax({
                url:'login',
                type:'POST',
                cache:false,
                dataType:'json',
                data:{
                    num:this.emil,
                    password:this.password
                },
                success:function(data){
                    if(data.succeed == null){
                        alert(data.info);
                    }
                    if(data.identification == '1'){
                        window.location.href="admin/menu.html";
                    }else {
                        window.location.href="customer/menu.html"
                    }
                },
                error:function(){
                    alert("请刷新网络")
                }
            })
        }
    }

})